import java.util.Scanner;

public class test63 {
    public static int reverse(int number) {
        int reversedNum = 0;
        int temp = Math.abs(number);
        while (temp > 0) {
            int digit = temp % 10;
            reversedNum = reversedNum * 10 + digit;
            temp /= 10;
        }
        return number < 0 ? -reversedNum : reversedNum;
    }
    public static boolean isPalindrome(int number) {
        return number == reverse(number);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个整数：");
        int num = scanner.nextInt();
        
        if (isPalindrome(num)) {
            System.out.println(num + " 是回文数");
        } else {
            System.out.println(num + " 不是回文数");
        }
        scanner.close();
    }
}
